MODULE_NAME = chrdemo
obj-m += $(MODULE_NAME).o
$(MODULE_NAME)-objs = chrdev_demo.o

APP_NAME = demo_app

CC = gcc

all:
	$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
	$(CC) $(APP_NAME).c -o $(APP_NAME)

clean:
	$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


